package com.gomoku.backend.controller.ranklist;

import com.alibaba.fastjson2.JSONObject;
import com.gomoku.backend.service.ranklist.RankListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RankListController {
    @Autowired
    RankListService rankListService;

    @RequestMapping("/ranklist/getlist")
    public JSONObject getRankList(@RequestParam Map<String,String> data){
        Integer page = Integer.valueOf(data.get("page"));
        return rankListService.getRankList(page);
    }

}
